package com.leyou.item.api;

import com.leyou.item.pojo.SpecParam;
import com.leyou.item.vo.SpecGroupDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: Rose
 * @Date: 2021/4/3 10:46
 * @description ${description}
 * @version: 1.0.0
 */
public interface SpecificationApi {

    /**
     * 根据组id 查询 商品规格参数
     *
     * @param gid
     * @return
     */
    @GetMapping("/spec/params")
    List<SpecParam> queryParamList(@RequestParam(value = "gid", required = false) Long gid,
                                   @RequestParam(value = "searching", required = false) Boolean searching,
                                   @RequestParam(value = "cid", required = false) Long cid);


    @GetMapping("spec/group")
    List<SpecGroupDTO> queryGroupByCid(@RequestParam("cid") Long cid);

}
